package leetcode.violence;

import java.util.Scanner;

public class characterNumber {
    public static void main(String[] args) {
        System.out.println(process());
    }
    public static int process(){
        System.out.println("输入不同字母个数");
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println("输入每种字母个数");
        int number=0;
        for (int i = 0; i < n ; i++) {
            number+=scanner.nextInt();
        }
        int sum = 1;
        for (int j = 1; j <= number; j++) {
            sum=sum*j;
        }
        for (int k=0; k < number-n ; k++){
           sum = sum/2;
        }
        return sum;
    }
}
